package com.putable.nmc.dmv.tests;

import junit.framework.TestCase;

import com.putable.nmc.dmv.CustomerLine;
import com.putable.nmc.dmv.Manager;
import com.putable.nmc.world.World;
import com.putable.pqueue.PQueue;
import com.putable.pqueue.PQueueImpl;

public class TestManager extends TestCase {

	public void testManager(){
		PQueue pq = new PQueueImpl();
		World world = new World();
		Manager m = new Manager(pq, world);
		double time = 0;
		while(true){
			m = (Manager) pq.remove();
			time = m.getTimeOfNextTask();
			m.run(time, new CustomerLine());
			if(time == 36000)break;
		}
		assertEquals(11, m.getNumReports());
	}
	
}
